+2005-11-11 Federico Mena Quintero <federico@ximian.com>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
+ check whether the path is a folder. It is useful to bookmark
+ files as well (e.g. todo.txt), and this will also help
+ performance.
+ (shortcuts_add_bookmark_from_path): Likewise.
+ (shortcuts_activate_iter): Change folders or select files, as
+ appropriate.
+
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c (main): Use
+2005-11-11 Federico Mena Quintero <federico@ximian.com>
+
+ * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Do not
+ check whether the path is a folder. It is useful to bookmark
+ files as well (e.g. todo.txt), and this will also help
+ performance.
+ (shortcuts_add_bookmark_from_path): Likewise.
+ (shortcuts_activate_iter): Change folders or select files, as
+ appropriate.
+
2005-11-11 Federico Mena Quintero <federico@ximian.com>
* tests/autotestfilechooser.c (main): Use
}
else
{
- if (!check_is_folder (impl->file_system, path, error))
- {
- profile_end ("end - is not folder", NULL);
- return FALSE;
- }
-
if (label)
label_copy = g_strdup (label);
else
if (shortcut_find_position (impl, path) != -1)
return FALSE;
- /* FIXME: this check really belongs in gtk_file_system_insert_bookmark. */
- error = NULL;
- if (!check_is_folder (impl->file_system, path, &error))
- {
- error_adding_bookmark_dialog (impl, path, error);
- return FALSE;
- }
-
error = NULL;
if (!gtk_file_system_insert_bookmark (impl->file_system, path, pos, &error))
{
const GtkFilePath *file_path;
file_path = col_data;
- change_folder_and_display_error (impl, file_path);
+ if (check_is_folder (impl->file_system, file_path, NULL))
+ change_folder_and_display_error (impl, file_path);
+ else
+ gtk_file_chooser_default_select_path (GTK_FILE_CHOOSER (impl), file_path, NULL);
}
}